class Animal:
    total = 0
    def __init__(self,name,age):
        self.name = name
        self.age = age

    def talk(self):
        pass

    def __del__(self):
        print("释放一些系统资源")

# 1、四个内置函数  hasattr  getattr  setattr  delattr
a= Animal("jj",3)
#print(dir(a))
print(hasattr(a, "name"))
print(getattr(a, "name1",None))
print(setattr(a,"weight",30))
print(a.weight)
print(delattr(a, "weight"))
print("---------------------------")
print(hasattr(Animal, "talk"))    # True
print(hasattr(Animal, "name"))    # False
print(hasattr(Animal, "total"))   # True


print(Animal.__class__)  # type
print(type(Animal))

print(type(int))

type()